<!DOCTYPE html>
<html lang="en">
  <head>
    <title>Time  Reference</title>
    <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="css/highlight.css" />
    <meta charset='utf-8'>
    <script src="js/jquery.min.js" defer></script>
    <script src="js/jazzy.js" defer></script>
    
  </head>
  <body>
    <a title="Time  Reference"></a>
    <header>
      <div class="content-wrapper">
        <p><a href="index.html">Venice Docs</a> (100% documented)</p>
        <p class="header-right"><a href="https://github.com/Zewo/Venice"><img src="img/gh.png"/>View on GitHub</a></p>
      </div>
    </header>
    <div class="content-wrapper">
      <p id="breadcrumbs">
        <a href="index.html">Venice Reference</a>
        <img id="carat" src="img/carat.png" />
        Time  Reference
      </p>
    </div>
    <div class="content-wrapper">
      <nav class="sidebar">
        <ul class="nav-groups">
          <li class="nav-group-name">
            <a href="Coroutines.html">Coroutines</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Classes/Coroutine.html">Coroutine</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Coroutine/Group.html">– Group</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Channels.html">Channels</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Classes/Channel.html">Channel</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Channel.html#/s:CC6Venice7Channel7Sending">– Sending</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/Channel.html#/s:CC6Venice7Channel9Receiving">– Receiving</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="File Descriptors.html">File Descriptors</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Classes/FileDescriptor.html">FileDescriptor</a>
              </li>
              <li class="nav-group-task">
                <a href="Classes/FileDescriptor/PollEvent.html">– PollEvent</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Time.html">Time</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Structs/Duration.html">Duration</a>
              </li>
              <li class="nav-group-task">
                <a href="Structs/Deadline.html">Deadline</a>
              </li>
              <li class="nav-group-task">
                <a href="Extensions/Int.html">Int</a>
              </li>
            </ul>
          </li>
          <li class="nav-group-name">
            <a href="Errors.html">Errors</a>
            <ul class="nav-group-tasks">
              <li class="nav-group-task">
                <a href="Enums/VeniceError.html">VeniceError</a>
              </li>
            </ul>
          </li>
        </ul>
      </nav>
      <article class="main-content">
        <section>
          <section class="section">
            <h1>Time</h1>
            
          </section>
          <section class="section task-group-section">
            <div class="task-group">
              <ul>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:V6Venice8Duration"></a>
                    <a name="//apple_ref/swift/Struct/Duration" class="dashAnchor"></a>
                    <a class="token" href="#/s:V6Venice8Duration">Duration</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Representation of a time interval.</p>

<p>To create a <code>Duration</code> you should use any of the following <code>Int</code> extensions:</p>

<ul>
<li>millisecond</li>
<li>milliseconds</li>
<li>second</li>
<li>seconds</li>
<li>minute</li>
<li>minutes</li>
<li>hour</li>
<li>hours</li>
</ul>
<h2 id='example' class='heading'>Example:</h2>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">oneMillisecond</span> <span class="o">=</span> <span class="mi">1</span><span class="o">.</span><span class="n">millisecond</span>
<span class="k">let</span> <span class="nv">twoMilliseconds</span> <span class="o">=</span> <span class="mi">2</span><span class="o">.</span><span class="n">milliseconds</span>
<span class="k">let</span> <span class="nv">oneSecond</span> <span class="o">=</span> <span class="mi">1</span><span class="o">.</span><span class="n">second</span>
<span class="k">let</span> <span class="nv">twoSeconds</span> <span class="o">=</span> <span class="mi">2</span><span class="o">.</span><span class="n">seconds</span>
<span class="k">let</span> <span class="nv">oneMinute</span> <span class="o">=</span> <span class="mi">1</span><span class="o">.</span><span class="n">minute</span>
<span class="k">let</span> <span class="nv">twoMinutes</span> <span class="o">=</span> <span class="mi">2</span><span class="o">.</span><span class="n">minutes</span>
<span class="k">let</span> <span class="nv">oneHour</span> <span class="o">=</span> <span class="mi">1</span><span class="o">.</span><span class="n">hour</span>
<span class="k">let</span> <span class="nv">twoHours</span> <span class="o">=</span> <span class="mi">2</span><span class="o">.</span><span class="n">hours</span>
</code></pre>

                        <a href="Structs/Duration.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Duration</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:V6Venice8Deadline"></a>
                    <a name="//apple_ref/swift/Struct/Deadline" class="dashAnchor"></a>
                    <a class="token" href="#/s:V6Venice8Deadline">Deadline</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        <p>Representation of a deadline.</p>

<p>To create a <code>Deadline</code> you can either use the static values <code>.immediately</code> and <code>.never</code>
or call <code>fromNow()</code> from a previously created <code><a href="Structs/Duration.html">Duration</a></code>.</p>
<h2 id='example' class='heading'>Example:</h2>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">deadline</span> <span class="o">=</span> <span class="mi">30</span><span class="o">.</span><span class="n">seconds</span><span class="o">.</span><span class="nf">fromNow</span><span class="p">()</span>
</code></pre>

                        <a href="Structs/Deadline.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Deadline</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
                <li class="item">
                  <div>
                    <code>
                    <a name="/s:Si"></a>
                    <a name="//apple_ref/swift/Extension/Int" class="dashAnchor"></a>
                    <a class="token" href="#/s:Si">Int</a>
                    </code>
                  </div>
                  <div class="height-container">
                    <div class="pointer-container"></div>
                    <section class="section">
                      <div class="pointer"></div>
                      <div class="abstract">
                        
                        <a href="Extensions/Int.html" class="slightly-smaller">See more</a>
                      </div>
                      <div class="declaration">
                        <h4>Declaration</h4>
                        <div class="language">
                          <p class="aside-title">Swift</p>
                          <pre class="highlight"><code><span class="kd">struct</span> <span class="kt">Int</span> <span class="p">:</span> <span class="kt">SignedInteger</span><span class="p">,</span> <span class="kt">Comparable</span><span class="p">,</span> <span class="kt">Equatable</span></code></pre>

                        </div>
                      </div>
                    </section>
                  </div>
                </li>
              </ul>
            </div>
          </section>
        </section>
        <section id="footer">
          <p>&copy; 2017 <a class="link" href="http://zewo.io" target="_blank" rel="external">Zewo</a>. All rights reserved. (Last updated: 2017-05-20)</p>
          <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
        </section>
      </article>
    </div>
  </body>
</div>
</html>
